/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 * Description:日志模块
 * Author: zhujiale
 * Create: 2023-12-12
 */
#include "adapter_error_manager.h"
#include "log.h"
#include "log_control.h"
#include "externalinput.h"

thread_local bool g_hcclErrToWarn = false;

bool HcclCheckLogLevel(int logType, int moduleId)
{
    return (CheckLogLevel(moduleId, logType) == 1);
}

void SetErrToWarnSwitch(bool flag)
{
    if (g_hcclErrToWarn != flag) {
        g_hcclErrToWarn = flag;
    }
}

bool IsErrorToWarn()
{
    return g_hcclErrToWarn;
}

bool IsRunInfoLogPrintToScreen()
{
    return (GetExternalInputLogConfig() == 1);
}